package com.intretech.umsin.datasource.codemapping.entity;

import java.io.Serializable;

/**
 * @version V1.0
 * @ClassName: MappingConfig
 * @Description:
 * @author: 李启联
 * @date: 2020-03-16 11:08
 * @Copyright: Copyright (c), 2020
 */
public class MappingConfig implements Serializable {

    private String fieldCodeProperty;//"码"在类中对应的字段名称

    private String fieldNameProperty;//"名"在类中对应的字段名称

    private Class targetClass;//"名"需要查找目标对象类型

    private String targetClassKeyProperty;//名"在需要查找目标对象所对应的键(Key)属性名

    private String targetClassFieldProperty;//"名"在需要查找目标对象所对应的字段属性名

    private String targetClassName;//"名"在需要查找目标实体对象类全名称

    public String getFieldCodeProperty() {
        return fieldCodeProperty;
    }

    public void setFieldCodeProperty(String fieldCodeProperty) {
        this.fieldCodeProperty = fieldCodeProperty;
    }

    public String getFieldNameProperty() {
        return fieldNameProperty;
    }

    public void setFieldNameProperty(String fieldNameProperty) {
        this.fieldNameProperty = fieldNameProperty;
    }

    public Class getTargetClass() {
        return targetClass;
    }

    public void setTargetClass(Class targetClass) {
        this.targetClass = targetClass;
    }

    public String getTargetClassKeyProperty() {
        return targetClassKeyProperty;
    }

    public void setTargetClassKeyProperty(String targetClassKeyProperty) {
        this.targetClassKeyProperty = targetClassKeyProperty;
    }

    public String getTargetClassFieldProperty() {
        return targetClassFieldProperty;
    }

    public void setTargetClassFieldProperty(String targetClassFieldProperty) {
        this.targetClassFieldProperty = targetClassFieldProperty;
    }

    public String getTargetClassName() {
        return targetClassName;
    }

    public void setTargetClassName(String targetClassName) {
        this.targetClassName = targetClassName;
    }

    public MappingConfig(String fieldCodeProperty, String fieldNameProperty, Class targetClass, String targetClassKeyProperty, String targetClassFieldProperty, String targetClassName) {
        this.fieldCodeProperty = fieldCodeProperty;
        this.fieldNameProperty = fieldNameProperty;
        this.targetClass = targetClass;
        this.targetClassKeyProperty = targetClassKeyProperty;
        this.targetClassFieldProperty = targetClassFieldProperty;
        this.targetClassName = targetClassName;
    }

    public MappingConfig() {
    }

    @Override
    public String toString() {
        return "MappingConfig{" +
                "fieldCodeProperty='" + fieldCodeProperty + '\'' +
                ", fieldNameProperty='" + fieldNameProperty + '\'' +
                ", targetClass=" + targetClass +
                ", targetClassKeyProperty='" + targetClassKeyProperty + '\'' +
                ", targetClassFieldProperty='" + targetClassFieldProperty + '\'' +
                ", targetClassName='" + targetClassName + '\'' +
                '}';
    }
}